package com.sojson.project.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sojson.project.dao.HotelOrderUserDao;
import com.sojson.project.entity.po.HotelOrderUser;
import com.sojson.project.service.HotelOrderUserService;

/**
 * 入驻记录用户信息Service实现类
 * 
 * @author liu
 * @date 2021-07-05
 */
@Service
public class HotelOrderUserServiceImpl implements HotelOrderUserService {

    @Resource
    private HotelOrderUserDao hotelOrderUserDaoImpl;

    /**
     * 单条插入
     * 
     * @param dto
     * @return
     */
    @Override
    public int insert(HotelOrderUser dto) {
        int insert = hotelOrderUserDaoImpl.insert(dto);
        return insert;
    }

    /**
     * 批量插入
     * 
     * @param dto
     * @return
     */
    @Override
    public int insertList(HotelOrderUser dto) {
        int insertList = hotelOrderUserDaoImpl.insertList(dto.getHotelOrderUsers());
        return insertList;
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param dto
     * @return
     */
    @Override
    public int deleteByDto(HotelOrderUser dto) {
        int deleteByDto = hotelOrderUserDaoImpl.deleteByDto(dto);
        return deleteByDto;
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        int countAll = hotelOrderUserDaoImpl.countAll();
        return countAll;
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<HotelOrderUser> listAll() {
        List<HotelOrderUser> findAll = hotelOrderUserDaoImpl.listAll();
        return findAll;
    }

    /**
     * 根据对象统计数量
     * 
     * @param dto
     * @return
     */
    @Override
    public int countByDto(HotelOrderUser dto) {
        int countByDto = hotelOrderUserDaoImpl.countByDto(dto);
        return countByDto;
    }

    /**
     * 根据对象查询
     * 
     * @param dto
     * @return
     */
    @Override
    public List<HotelOrderUser> listByDto(HotelOrderUser dto) {
        List<HotelOrderUser> findByDto = hotelOrderUserDaoImpl.listByDto(dto);
        return findByDto;
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        int deleteById = hotelOrderUserDaoImpl.deleteById(id);
        return deleteById;
    }

    /**
     * 通过id数组删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIds(Integer[] ids) {
        int deleteByIds = hotelOrderUserDaoImpl.deleteByIds(ids);
        return deleteByIds;
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateAllById(HotelOrderUser dto) {
        int updateAllById = hotelOrderUserDaoImpl.updateAllById(dto);
        return updateAllById;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateAllByIdList(HotelOrderUser dto) {
        int updateAllByIdList = hotelOrderUserDaoImpl.updateAllByIdList(dto);
        return updateAllByIdList;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateDtoListAllById(HotelOrderUser dto) {
        int updateDtoListAllById = hotelOrderUserDaoImpl.updateDtoListAllById(dto.getHotelOrderUsers());
        return updateDtoListAllById;
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateById(HotelOrderUser dto) {
        int updateById = hotelOrderUserDaoImpl.updateById(dto);
        return updateById;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateByIdList(HotelOrderUser dto) {
        int updateByIdList = hotelOrderUserDaoImpl.updateByIdList(dto);
        return updateByIdList;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param dto
     * @return
     */
    @Override
    public int updateDtoListById(HotelOrderUser dto) {
        int updateDtoListById = hotelOrderUserDaoImpl.updateDtoListById(dto.getHotelOrderUsers());
        return updateDtoListById;
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public HotelOrderUser findById(Integer id) {
        HotelOrderUser findById = hotelOrderUserDaoImpl.findById(id);
        return findById;
    }

    /**
     * 通过id数组查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<HotelOrderUser> findByIds(Integer[] ids) {
        List<HotelOrderUser> findByIds = hotelOrderUserDaoImpl.findByIds(ids);
        return findByIds;
    }

    /**
     * 通过对象查询id列表
     * 
     * @param dto
     * @return
     */
    @Override
    public List<Integer> findIdByDto(HotelOrderUser dto) {
        List<Integer> findIdByDto = hotelOrderUserDaoImpl.findIdByDto(dto);
        return findIdByDto;
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public int clear() {
        return hotelOrderUserDaoImpl.clear();
    }

}